<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
-->
</style>
<link href="{<$css_url>}admin/skin.css" rel="stylesheet" type="text/css" />
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="{<$image_url>}admin/mail_leftbg.gif"><img src="{<$image_url>}admin/left-top-right.gif" width="17" height="29" /></td>
    <td width="935" height="29" valign="top" background="{<$image_url>}admin/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">添加新文章</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="{<$image_url>}admin/mail_rightbg.gif"><img src="{<$image_url>}admin/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="{<$image_url>}admin/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="13" valign="top">&nbsp;</td>
      </tr>
      <tr>
        <td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td class="left_txt">当前位置：添加新文章</td>
          </tr>
          <tr>
            <td height="20"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
              <tr>
                <td></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" height="55" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="10%" height="55" valign="middle"><img src="{<$image_url>}admin/title.gif" width="54" height="55"></td>
                <td width="90%" valign="top"><span class="left_txt2">在这里，您可以根据您的网站要求，修改设置网站的</span><span class="left_txt3">基本参数</span><span class="left_txt2">！</span><br>
                          <span class="left_txt2">包括</span><span class="left_txt3">网站名称，网址，网站备案号，联系方式，网站公告，关键词，风格</span><span class="left_txt2">等以及网站</span><span class="left_txt3">会员及等级积分设置</span><span class="left_txt2">。 </span></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
              <tr>
                <td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;基本内容</td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
			<form name="form1" method="POST" action="admintitlechk.asp" enctype="multipart/form-data">
              <tr>
                <td width="20%" height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">标题：</td>
                <td width="3%" bgcolor="#f2f2f2">&nbsp;</td>
                <td width="32%" height="30" bgcolor="#f2f2f2"><input name="title" type="text" id="title" size="30" /></td>
                <td width="45%" height="30" bgcolor="#f2f2f2" class="left_txt">文章标题</td>
              </tr>
              <tr>
                <td height="30" align="right" class="left_txt2">url：</td>
                <td>&nbsp;</td>
                <td height="30"><input type="text" name="url" size="30" /></td>
                <td height="30" class="left_txt">网址</td>
              </tr>
              <tr>
                <td height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">标签：</td>
                <td bgcolor="#f2f2f2">&nbsp;</td>
                <td height="30" bgcolor="#f2f2f2"><input type="text" name="tags" size="25" /></td>
                <td height="30" bgcolor="#f2f2f2" class="left_txt">多个标签请用逗号分隔</td>
              </tr>
              <tr>
                <td height="30" align="right" class="left_txt2">类别： </td>
                <td>&nbsp;</td>
                <td height="30">
                <select name="post_type">
                    {<foreach from=$types item=type>}
                    <option value="{<$type.id>}">{<$type.type_name>}</option>
                    {</foreach>}
                </select>
                </td>
                <td height="30" class="left_txt">类别</td>
              </tr>
              <tr>
                <td height="30" align="right" bgcolor="#f2f2f2" class="left_txt2">描述：</td>
                <td bgcolor="#f2f2f2">&nbsp;</td>
                <td height="30" bgcolor="#f2f2f2">
                <textarea name="content" cols="40" rows="4"></textarea>
                </td>
                <td height="30" bgcolor="#f2f2f2" class="left_txt">文章描述</td>
              </tr>
              <tr>
                <td height="30" colspan="4" align="right" class="left_txt2">
                <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="nowtable">
                  <tr>
                    <td class="left_bt2">&nbsp;&nbsp;&nbsp;&nbsp;图片上传&nbsp;<input type="text" name="file_num" id="file_num" value="1" size="5">&nbsp;<input type="button" onclick="set_file_count();" value="设定" /></td>
                  </tr>
                </table>
                </td>
              </tr>
              <tr bgcolor="#f2f2f2">
                <td height="30" colspan="4" class="left_txt2"><div id="file_div">图片1：<input type="file" name="file1" />&nbsp;&nbsp;<input type="radio" name="cover" value="1" checked>设为封面</div></td>
              </tr>
            </table></td>
          </tr>
        </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" colspan="3">&nbsp;<input type="hidden" name="action" value="add" /></td>
            </tr>
            <tr>
              <td width="50%" height="30" align="right"><input type="submit" value="发布文章" name="B1" /></td>
              <td width="6%" height="30" align="right">&nbsp;</td>
              <td width="44%" height="30"><input type="reset" value="重新填写" name="B12" /></td>
            </tr>
            <tr>
              <td height="30" colspan="3">&nbsp;</td>
            </tr>
            </form>
          </table></td>
      </tr>
    </table></td>
    <td background="{<$image_url>}admin/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="{<$image_url>}admin/mail_leftbg.gif"><img src="{<$image_url>}admin/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="{<$image_url>}admin/buttom_bgs.gif"><img src="{<$image_url>}admin/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="{<$image_url>}admin/mail_rightbg.gif"><img src="{<$image_url>}admin/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
<script type="text/javascript">
    function set_file_count(){
        var count = document.getElementById('file_num').value;
        var file_html = '';
        for(var i=1;i<=count;i++){
            file_html += '图片'+i+'：<input type="file" name="file'+i+'">&nbsp;&nbsp;<input type="radio" name="cover" value="'+i+'"';
            if(i==1){
                file_html += ' checked ';
            }
            file_html += '/>设为封面<br />';
        }
        document.getElementById('file_div').innerHTML = file_html;
    }
</script>
</body>
